import request from '@/utils/request'

// 查询保养记录列表
export function listUpkeep(query) {
  return request({
    url: '/shebei/upkeep/list',
    method: 'get',
    params: query
  })
}

// 查询保养记录详细
export function getUpkeep(upkeepId) {
  return request({
    url: '/shebei/upkeep/' + upkeepId,
    method: 'get'
  })
}

// 新增保养记录
export function addUpkeep(data) {
  return request({
    url: '/shebei/upkeep',
    method: 'post',
    data: data
  })
}

// 修改保养记录
export function updateUpkeep(data) {
  return request({
    url: '/shebei/upkeep',
    method: 'put',
    data: data
  })
}

// 删除保养记录
export function delUpkeep(upkeepId) {
  return request({
    url: '/shebei/upkeep/' + upkeepId,
    method: 'delete'
  })
}
